/**
 * convention：
 *   input/output rotation with Quaternion or [x,y,z,w];
 *   input/output position width vector3 or [x,y,z];
 *   input/output basis width matrix3×3 or [00,01,02,10,11,12,20,21,22]
 */


let constant= {

    GEOMETRY_TYPE_NULL:1000,
    GEOMETRY_TYPE_SPHERE: 1001,
    GEOMETRY_TYPE_BOX: 1002,
    GEOMETRY_TYPE_CYLINDER: 1003,
    GEOMETRY_TYPE_CONE: 1004,
    GEOMETRY_TYPE_CAPSULE: 1005,
    GEOMETRY_TYPE_CONVEX_HULL: 1006,

    JOINT_TYPE_NULL:2000,
    JOINT_TYPE_SPHERICAL: 2001,
    JOINT_TYPE_REVOLUTE: 2002,
    JOINT_TYPE_CYLINDRICAL: 2003,
    JOINT_TYPE_PRISMATIC: 2004,
    JOINT_TYPE_UNIVERSAL: 2005,
    JOINT_TYPE_RAG_DOLL: 2006,
    JOINT_TYPE_GENERIC: 2007,

    RIGID_BODY_TYPE_DYNAMIC: 3000,
    RIGID_BODY_TYPE_STATIC: 3001,
    RIGID_BODY_TYPE_KINEMATIC: 3002,

    SIMULATE_STATE_START:4000,
    SIMULATE_STATE_STOP:4001,
    SIMULATE_STATE_IMMEDIATELY:4002,

    BROAD_PHASE_TYPE_NULL: 5000,
    BROAD_PHASE_TYPE_BRUTE_FORCE: 5001,
    BROAD_PHASE_TYPE_BVH: 5002,

    BVH_INSERTION_STRATEGY_SIMPLE: 0,
    BVH_INSERTION_STRATEGY_MINIMIZE_SURFACE_AREA: 1,

    BOX_BOX_DETECTOR_EDGE_BIAS_MULT: 1,

    EPA_POLYHEDRON_STATE_OK: 0,
    EPA_POLYHEDRON_STATE_INVALID_TRIANGLE: 1,
    EPA_POLYHEDRON_STATE_NO_ADJACENT_PAIR_INDEX: 2,
    EPA_POLYHEDRON_STATE_NO_ADJACENT_TRIANGLE: 3,
    EPA_POLYHEDRON_STATE_EDGE_LOOP_BROKEN: 4,
    EPA_POLYHEDRON_STATE_NO_OUTER_TRIANGLE: 5,
    EPA_POLYHEDRON_STATE_TRIANGLE_INVISIBLE: 6,
    EPA_TRIANGLE_COUNT: 0,
    VEC3_NUM_CREATIONS: 0,

    SETTING_DEFAULT_FRICTION: 0.2,
    SETTING_DEFAULT_RESTITUTION: 0.2,
    SETTING_DEFAULT_DENSITY: 1,
    SETTING_DEFAULT_COLLISION_GROUP: 1,
    SETTING_DEFAULT_COLLISION_MASK: 1,
    SETTING_MAX_TRANSLATION_PER_STEP: 20,
    SETTING_MAX_ROTATION_PER_STEP: 3.14159265358979,
    SETTING_BVH_PROXY_PADDING: 0.1,
    SETTING_BVH_INCREMENTAL_COLLISION_THRESHOLD: 0.45,
    SETTING_DEFAULT_GJK_MARGIN: 0.05,
    SETTING_ENABLE_GJK_CACHING: true,
    SETTING_MAX_EPA_VERTICES: 128,
    SETTING_MAX_EPA_POLYHEDRON_FACES: 128,
    SETTING_CONTACT_ENABLE_BOUNCE_THRESHOLD: 0.5,
    SETTING_VELOCITY_BAUMGARTE: 0.2,
    SETTING_POSITION_SPLIT_IMPULSE_BAUMGARTE: 0.4,
    SETTING_POSITION_NGS_BAUMGARTE: 1.0,
    SETTING_CONTACT_USE_ALTERNATIVE_POSITION_CORRECTION_ALGORITHM_DEPTH_THRESHOLD: 0.05,
    SETTING_DEFAULT_CONTACT_POSITION_CORRECTION_ALGORITHM: 0,
    SETTING_ALTERNATIVE_CONTACT_POSITION_CORRECTION_ALGORITHM: 1,
    SETTING_CONTACT_PERSISTENCE_THRESHOLD: 0.05,
    SETTING_MAX_MANIFOLD_POINTS: 4,
    SETTING_DEFAULT_JOINT_CONSTRAINT_SOLVER_TYPE: 0,
    SETTING_DEFAULT_JOINT_POSITION_CORRECTION_ALGORITHM: 0,
    SETTING_JOINT_WARM_STARTING_FACTOR_FOR_BAUNGARTE: 0.8,
    SETTING_JOINT_WARM_STARTING_FACTOR: 0.95,
    SETTING_MIN_SPRING_DAMPER_DAMPING_RATIO: 1E-6,
    SETTING_MIN_RAG_DOLL_MAX_SWING_ANGLE: 1E-6,
    SETTING_MAX_JACOBIAN_ROWS: 6,
    SETTING_DIRECT_MLCP_SOLVER_EPS: 1E-9,
    SETTING_ISLAND_INITIAL_RIGID_BODY_ARRAY_SIZE: 128,
    SETTING_ISLAND_INITIAL_CONSTRAINT_ARRAY_SIZE: 128,
    SETTING_SLEEPING_VELOCITY_THRESHOLD: 0.2,
    SETTING_SLEEPING_ANGULAR_VELOCITY_THRESHOLD: 0.5,
    SETTING_SLEEPING_TIME_THRESHOLD: 1.0,
    SETTING_DISABLE_SLEEPING: false,
    SETTING_LINEAR_SLOP: 0.005,
    SETTING_ANGULAR_SLOP: 0.017453292519943278,

    GJK_EPA_RESULT_STATE_SUCCEEDED: 0,
    GJK_EPA_RESULT_STATE_GJK_FAILED_TO_MAKE_TETRAHEDRON: 1,
    GJK_EPA_RESULT_STATE_GJK_DID_NOT_CONVERGE: 2,
    GJK_EPA_RESULT_STATE_EPA_FAILED_TO_INIT: 257,
    GJK_EPA_RESULT_STATE_EPA_FAILED_TO_ADD_VERTEX: 258,
    GJK_EPA_RESULT_STATE_EPA_DID_NOT_CONVERGE: 259,

    MAT3_NUM_CREATIONS: 0,
    MAT4_NUM_CREATIONS: 0,
    QUAT_NUM_CREATIONS: 0,
    POSITIVE_INFINITY: Number.POSITIVE_INFINITY,
    NEGATIVE_INFINITY: Number.NEGATIVE_INFINITY,
    PI: 3.14159265358979,
    TWO_PI: 6.28318530717958,
    HALF_PI: 1.570796326794895,
    TO_RADIANS: 0.017453292519943278,
    TO_DEGREES: 57.29577951308238,

    POSITION_CORRECTION_ALGORITHM_BAUMGARTE: 0,
    POSITION_CORRECTION_ALGORITHM_SPLIT_IMPULSE: 1,
    POSITION_CORRECTION_ALGORITHM_NGS: 2,

    JACOBIAN_ROW_BIT_LINEAR_SET: 1,
    JACOBIAN_ROW_BIT_ANGULAR_SET: 2,

    CONSTRAINT_SOLVER_TYPE_ITERATIVE: 0,
    CONSTRAINT_SOLVER_TYPE_DIRECT: 1,

};

export default constant